import request from '@/utils/request'
/**
 *文件库列表页
 * @param {*} data
 */
// 获取所有资源
export function getSourceList(data) {
  return request({
    url: 'KmsResource/queryPageList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
// 获取资源下的文件列表
export function getSourceFileList(data) {
  return request({
    url: 'KmsResource/queryResourceFileList',
    method: 'post',
    data: data
  })
}
// 保存资源
export function saveResource(data) {
  return request({
    url: 'KmsResource/saveOrUpdate',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
// 删除资源列表数据
export function deleteResource(data) {
  return request({
    url: 'KmsResource/deleteByIds',
    method: 'post',
    data: data
  })
}
// 通过id获得对应的文件
export function getSourceById(data) {
  return request({
    url: '/KmsResource/queryById',
    method: 'post',
    data: data
  })
}
// 获取评论列表数据
export function getRemarkList(data) {
  return request({
    url: 'KmsComment/queryCommentList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
// 添加评论数据
export function updataRemark(data) {
  return request({
    url: 'KmsComment/addComment',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
// 删除评论数据
export function deleteRemark(data) {
  return request({
    url: 'KmsComment/deleteByIds',
    method: 'post',
    data: data
  })
}
